<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>

<!-- iOS 1.1.3+: this is the icon that's used when the user adds your app to the home screen -->
<!-- also works on Android! -->
<link rel="apple-touch-icon" href="../images/icon.png" />

<!-- iOS 2.0+: tell iOS not to apply any glare effects to the icon -->
<link rel="apple-touch-icon-precomposed" href="../images/icon.png" />

<!-- iOS 4.2+ icons for different resolutions -->
<link rel="apple-touch-icon" sizes="72x72"
	href="../images/touch-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114"
	href="../images/touch-icon-iphone4.png" />

<!-- iOS 3+: full-screen startup splash screen image (must be 320x460) -->
<link rel="apple-touch-startup-image" href="../images/startup.png">

<!-- enable full-screen mode (only when launched from home screen) -->
<meta name="apple-mobile-web-app-capable" content="yes" />

<!-- controls the appearance of the status bar in full-screen mode -->
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

<!-- jQuery einbinden-->
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>

<!-- jQuery UI-->
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />

<!-- Get Flickr Images JS -->
 <script type="text/javascript" src="../js/getflickr.js"></script>


 
<!-- AJAX -->
<script type="text/javascript" src="../js/ajax.js"></script>

<!-- FB-Data Import -->
<script type="text/javascript" src="../js/fbdata.js"></script>

<title>I Like That</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<!-- CSS einbinden -->
<link rel="stylesheet" href="../css/screen.css"
	media="only screen and (min-width:720px)" type="text/css">
<!--iPhone css -->
<link rel="stylesheet" href="../css/handheld.css"
	media="only screen and (max-device-width: 480px)" type="text/css">

<!-- Mobile Einstellung-->
<meta name="viewport"
	content="width=device-width, maximum-scale=1, initial-scale=1, user-scalable=no" />
	
<script type="text/javascript">
var flickr = $.getJSON("http://flickr.com/services/feeds/photos_public.gne?tags="+"<%=request.getParameter("cat")%>"+"&format=json&jsoncallback=?", function(data){
    $.each(data.items, function(i,item){
    	console.log(item.media.m.replace(/_m\.jpg/g,'_c.jpg'));
    	$.post('../jsp/insertimages.jsp', {
    		cat: cate = "<%=request.getParameter("cat")%>",
    		img: pic = item.media.m.replace(/_m\.jpg/g,'_c.jpg').toString()
    	});
   
//         $("<img/>").attr("id", i).attr("src", item.media.m.replace(/_m\.jpg/g,'_c.jpg')).appendTo("#images")
//         .wrap("<a href='" + item.link + "'></a>")
    });
});
</script>
</head>
<body>


<div id="images"></div>

</body>
</html>
